<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>es5实现继承</title>
</head>
<body>
    <script>
        person = {
            name:"cq",
            age:18,
            height:1.88
        }

        console.log(person);
        console.log(person._proto_);
        console.log(Object.getPrototypeOf(person));

        function foo()
        {

        }

        console.log(foo.prototype);
        foo.prototype.running=function running ()
        {
           console.log("跑步");
        }

        foo.prototype.eatting = function eatting()
        {
            console.log("吃饭");
        }

        var foo1 = new foo();
        foo1.running();
        foo1.eatting();
        console.log(foo1);
    </script>
</body>
</html>